public class Student {
    private String name;
    private String sex;
    private String ID;
    private int old;
    private float score;

    //---------------------------构造函数---------------------
    Student(String name, String sex, String ID, int old, float score) {
        this.name = name;
        this.sex = sex;
        this.ID = ID;//仅为一个
        this.old = old;
        this.score = score;
    }

    Student() {
        name = null;
        sex = null;
        ID = null;
        old = 0;
        score = 0;
    }

    //-----------------------------get函数--------------------------

    public String getName() {
        return name;
    }

    public String getSex() {
        return sex;
    }

    public String getID() {
        return ID;
    }

    public int getOld() {
        return old;
    }

    public float getScore() {
        return score;
    }

    //------------------------------set函数---------------------------
    public void setName(String name) {
        this.name = name;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public void setOld(int old) {
        this.old = old;
    }

    public void setScore(float score) {
        this.score = score;
    }

    //------------------------tostring函数-------------------------
    public String toString(){
        return ID+"\t"+name+"\t"+sex+"\t";
    }
    public void show(){
        System.out.format("%-8s%-8s%-4s\n",ID,name,sex);
    }
}
